package com.smzd.framework.config.intercepters;

import org.springframework.web.servlet.mvc.annotation.IMethodIntercepter;

import com.smzd.framework.system.domain.User;
import com.smzd.framework.utils.MeetingSessionHolder;
import com.smzd.framework.utils.Privilege;

public class MethodPrivilegeIntercepter extends BaseMethodPrivilegeIntercepter
		implements IMethodIntercepter {

	@Override
	protected boolean isUserLoggedIn() {
		User loginUser = MeetingSessionHolder.getLoginUser();
		return loginUser != null;
	}

	@Override
	protected Privilege getPrivilege() {
		Privilege privilege = MeetingSessionHolder.getPrivilege();
		return privilege;
	}
}
